package com.edu.entity;

import com.sun.xml.internal.bind.v2.model.core.ID;

import java.time.LocalDateTime;

public class Rentals {
    private  int id;
    private String type;
    private String name;
    private LocalDateTime rentalTime; //租车时间
    private int duration; //租车天数
    private double totalCost; //租车总租金
    private int state; //状态 0: 未付款 1:已付款

    public Rentals() {
    }

    public Rentals(int id, String type, String name, LocalDateTime rentalTime, int duration, double totalCost, int state) {
        this.id = id;
        this.type = type;
        this.name = name;
        this.rentalTime = rentalTime;
        this.duration = duration;
        this.totalCost = totalCost;
        this.state = state;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDateTime getRentalTime() {
        return rentalTime;
    }

    public void setRentalTime(LocalDateTime rentalTime) {
        this.rentalTime = rentalTime;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(double totalCost) {
        this.totalCost = totalCost;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Rentals{" +
                "id=" + id +
                ", type='" + type + '\'' +
                ", name='" + name + '\'' +
                ", rentalTime=" + rentalTime +
                ", duration=" + duration +
                ", totalCost=" + totalCost +
                ", state=" + state +
                '}';
    }
}
